import java.util.Scanner;

public class demo05 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int v1=sc.nextInt();//兔子速度
        int v2=sc.nextInt();//乌龟速度
        int t=sc.nextInt();//领先t米
        int s=sc.nextInt();//休息s秒
        int l=sc.nextInt();//全场l米
        int wuguim=0;
        int wuguit=0;
        int tuzim=0;
        int tuzit=0;
        while (wuguim<l&&tuzim<l){
            if(tuzim-wuguim<t){
                wuguit++;
                tuzit++;
                tuzim=v1*tuzit;
                wuguim=v2*wuguit;
            }else{
                wuguit+=s;
                wuguim=wuguit*v2;
            }
        }
        if(tuzim>wuguim){
            System.out.println("R");
            System.out.println(wuguit);
        } else if (tuzim==wuguim) {
            System.out.println("D");
            System.out.println(l/v2);
        }else{
            System.out.println("T");
            System.out.println(l/v2);
        }
    }
}
